<?php
	print_r($_POST);
	var_dump($_POST['spec'][1]);
	var_dump($_POST['spec'][2]);



//重组数组
p($tyattr);	
		
			Array(
			    [0] => Array
			        (
			            [tid] => 2
			            [tname] => 处理器
			            [tvalue] => 双核|四核
			            [tclass] => 1
			            [type_typid] => 1
			        )
			
			    [1] => Array
			        (
			            [tid] => 7
			            [tname] => y硬盘
			            [tvalue] => 8G|16G
			            [tclass] => 1
			            [type_typid] => 1
			        )
			
			)
		p($gattr);
		$attr=array();
		foreach ($tyattr as $k => $v) {
			
			$arr['tname']= $v['tname'];
			$arr['tavalue']=DB::table('goodsattr')->where('typeattr_tid='.$v['tid'])->get();
			$attr[]=$arr;
			p($arr);
		}

		
		
		p($attr);












?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
	<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
	<title>Document</title>
</head>
<body>
	<form method="post">
		1<input type="text" name="spec[1][value][]" id="" /><input type="text" name="spec[1][price][]" id="" /><br>
		2<input type="text" name="spec[1][value][]" id="" /><input type="text" name="spec[1][price][]" id="" /><br>
		3<input type="text" name="spec[1][value][]" id="" /><input type="text" name="spec[1][price][]" id="" /><br>
		4<input type="text" name="spec[2][value][]" id="" /><input type="text" name="spec[2][price][]" id="" /><br>
		5<input type="text" name="spec[2][value][]" id="" /><input type="text" name="spec[2][price][]" id="" /><br>
		6<input type="text" name="spec[2][value][]" id="" /><input type="text" name="spec[2][price][]" id="" /><br>
		<input type="submit" value="ss" />
		<!-- spec=array(
			1=>array(
				value=>array(
					白色，蓝色
				),
				price=>array(
					10，20
				)
			),
			2=>array(
				value=>array(
					8G,20G
				),
				price=>array(
					100,300
				)
			)
		) -->
	</form>
</body>
</html>